﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Zombie_Demo.Utilities
{
     public static class Maths
     {
          private static Random rand = new Random();
          public static double Distance(Vector2 a, Vector2 b)
          {
               float x = b.X - a.X;
               float y = b.Y - a.Y;
               double toReturn = Math.Sqrt(Math.Pow(x, 2) + Math.Pow(y, 2));
               return toReturn;
          }

          public static double ToRadians(float angle)
          {
               return angle * (Math.PI / 180);
          }

          public static int RandomInt()
          {
               return rand.Next();
          }

          /// <summary>
          /// Returns non negative int less than max specified.
          /// </summary>
          /// <param name="maxValue"></param>
          /// <returns></returns>
          public static int RandomInt(int maxValue)
          {
               return rand.Next(maxValue);
          }

          public static int RandomInt(int lowBound, int maxBound)
          {
               return rand.Next(lowBound, maxBound);
          }
     }
}
